package dryven.model.binding.fieldset;

import dryven.util.crypt.SHA256Hash;

public abstract class FieldBase implements Field {
	@Override
	public boolean equals(Object f) {
		return 
			f instanceof Field && 
			((Field)f).getName().equals(getName()) && 
			((Field)f).getModelType().equals(getModelType());
	}

	@Override
	public String getUniqueName() {
		return new SHA256Hash(this.getModelType().getName()).hash()+"_"+this.getName();
	}
}
